#pragma once

#include <stdint.h>

#include "u8g2_font_menu_chs.hpp"

#define BIG_TEXT_FONT   u8g2_font_spleen8x16_mr
#define SMALL_TEXT_FONT u8g2_font_spleen5x8_mr
#define CHS_FONT u8g2_font_menu_chs


void init_oled();

void show_msg(const char *msg);

void clear_box(u8g2_int_t x, u8g2_int_t y, u8g2_int_t w, u8g2_int_t h);

void begin_msg();

void end_msg();

void show_meters(uint16_t m, uint16_t mm);

void show_count(uint32_t count, char mark, const char* alt);

void show_response_time(uint32_t time_ms);

void show_slave_address(uint8_t slave);

void draw_left_arrow();

void draw_right_arrow();

void draw_up_arrow(int16_t x, int16_t y);

void draw_down_arrow(int16_t x, int16_t y);

inline void draw_up_arrow() {
    draw_up_arrow(64, 0);
}

inline void draw_down_arrow() {
    draw_down_arrow(64, 63);
}

void draw_mode(const char* str);

void show_ask(const char* msg);